<template>
	<view class="content">
		<view class="pageHeader">
			消息
			<a class="generalBack" @click="backpage()" hover-class="none">
			 <image src="/static/b-1.png" style="width: 18upx;height: 30upx;"></image>
			 </a>
		</view>
		<view class="regoodbox">
			<view @click="gopage(1)">
				<view style="margin-bottom:4upx;background-color: #fff;padding: 26upx 30upx;">
					 
					<view  style="display: flex;align-items: center;position: relative;">
						<image src="/static/system/notice.png" style="width: 76upx;height: 76upx;margin-right: 20upx;"></image>
						<view style="display: flex;flex-direction: column;justify-content: space-between;flex:3;color: #333;">
							<view class="goods-info" style="font-size:30upx;">
								系统通知
							</view>
						 
							<view style="color: #999;font-size: 24upx;margin-top: 22upx;">
								最新系统更新通知
							</view>
						</view>
					</view>
				</view>
				
				
			  
			</view>
			<view @click="gopage(2)">
				<view style="margin-bottom:4upx;background-color: #fff;padding: 26upx 30upx;">
					 
					<view style="display: flex;align-items: center;position: relative;">
						<image src="/static/system/news.png" style="width: 76upx;height: 76upx;margin-right: 20upx;"></image>
						<view style="display: flex;flex-direction: column;justify-content: space-between;flex:3;color: #333;">
							<view class="goods-info" style="font-size:30upx;">
								系统消息
							</view>
						 
							<view style="color: #999;font-size: 24upx;margin-top: 22upx;">
								您有新的消息
							</view>
						</view>
						<view style="display: flex;flex-direction: column;justify-content: space-between;flex:1;color: #333;font-size: 24upx;" v-if="common_message_total>0">
						 
							<view style="margin: auto;">
								<view style="width:34upx;height:34upx;color: #fff;font-size: 24upx;margin-top: 22upx;background-color: #EC6104;text-align: center;border-radius:20upx;display:block">
									{{common_message_total}}</view>
							
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
	</template>
<script>
	import postAjax from '../../../API/postAjax.js'
	export default {
		data() {
			return {
				userToken:'',// token
				common_message_total:0,
			}
		},
		onLoad(options) {
			let that = this
			that.userToken = uni.getStorageSync('token')
			let getOptions = options
			console.log(options);
			that.common_message_total = options.common_message_total;
		 
		},
		methods: {
			// 返回上一页
			backpage(){
				uni.navigateBack({
					delta:1
				})
			},
			gopage(type){
				if(type ==1 )
				{
					uni.navigateTo({
						url:'systemsglist' 
					})
				}
				else if(type==2)
				{
					uni.navigateTo({
						url:'systemnewslist'
					})
					
				}
				this.common_message_total=0
			},
			 
		}
	}
	
</script>

<style>
	.content{min-height: 100vh;background-color: #F9F9F9;}
	.goods-info{overflow:hidden; text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:1;}
	.cancel{color:#EC6104;border:2upx solid #EC6104;background-color: transparent;border-radius: 8upx;}
	.pageHeader{position: fixed;top:0;left:0;z-index:999;width: 100%;height: 108upx;background-color: #1D84E8;line-height: 128upx;text-align: center;font-size: 36upx;color: #fff;padding-top: 40upx;}
	.generalBack{position: absolute;top:40upx;left:30upx;display: block;}
	.rebtn{display: inline-block;font-size: 30upx;border-radius: 4upx;height: 58upx;line-height: 58upx;position: absolute;bottom:0;right: 20upx;}
	.rebtn::after{border: none;}
	.regoodbox{padding: 140upx 0upx 0upx;}
	.total-wrap {
	  width: 100vw;
	  height: auto;
	  box-sizing: border-box;
	  padding: 20upx;
	}
	.logistics-title {
		position: relative;
	    box-sizing: border-box;
	    padding:16upx 0;
		border-bottom:2upx solid #EEEEEE;
	    line-height: 28upx;
	    color: #4B4B4B;
	    font-size: 26upx;
	    font-family: 'PingFangSC-Medium';
	    text-align: left;
	}
</style>
